<h1>Users </h1>
<table>
<tr>
<th></th>
<th>Names</th>
<th>Actions</th>
</tr>

<?php foreach($result as $user): ?>
  <tr>
	
    <td><?php echo $this->Form->checkbox($user['User']['username']); ?> </td>
    <td><?php echo $user['User']['username']; ?> </td>
    <td><?php echo $this->Html->link('Tweets', 
          array('controller'=>'Posts','action' => 'filterTweetsByUser', $user['User']['userID']));?>
  
        <?php echo $this->Html->link('DMs', 
          array('controller'=>'Posts','action' => 'viewUserDirectMessages', $user['User']['userID']));?></td>
	<td>
		
		<?php
                    echo $this->Html->link($this->Html->image('delete.png', array(
                                'alt' => 'Delete Tweet')
                            ), array(
							'controller' => 'Posts',
                        'action' => 'deleteAll',
                        $user['User']['userID']
                            ), array(
                        'escape' => false,
                        'confirm' => "Are you sure you want to delete '".$user['User']['username']."' tweets from the system?"
                    ));
                    ?>  
							</td>
  </td>
  </tr>
  <?php endforeach; ?>
  <?//PHP print_r($user);?>
</table>

